/*
 * @Author: 熊志伟 xiongzhiwei
 * @Date: 2024-11-08 13:34:26
 * @LastEditors: 熊志伟 xiongzhiwei
 * @LastEditTime: 2024-11-12 17:28:37
 * @FilePath: \sr_system_manager_ui\vite\plugins\auto-import.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import autoImport from 'unplugin-auto-import/vite'
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
import { VueHooksPlusResolver } from '@vue-hooks-plus/resolvers'

export default function createAutoImport() {
  return autoImport({
    include: [
      /\.[tj]sx?$/, // .ts, .tsx, .js, .jsx
      /\.vue$/, /\.vue\?vue/, // .vue
      /\.md$/, // .md  
    ],
    imports: [
      'vue',
      'vue-router',
      'pinia'
    ],
    resolvers: [ElementPlusResolver(), VueHooksPlusResolver()],
    dts: 'auto-imports.d.ts',
    eslintrc: {
      enabled: true,
    },
  })
}
